Skip to content

Add Codex review comment auto-resolve bridge#435

Merged
BigSimmo merged 1 commit into
mainfrom
codex/auto-resolve-review-comments
Jul 9, 2026
Merged

Add Codex review comment auto-resolve bridge#435
BigSimmo merged 1 commit into
mainfrom
codex/auto-resolve-review-comments

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Adds no-API-key Codex auto-resolve bridge for review comments:

  • Adds .github/workflows/codex-autofix-review-comments.yml.
  • Adds Database-specific Codex review/fix behavior to AGENTS.md.
  • The workflow listens for top-level chatgpt-codex-connector inline review comments and posts the primary @codex resolve all review comments... command once per PR head commit.

Behavior

  • P0/P1: Codex is instructed to fix with the best minimal change.
  • P2/lower: Codex is instructed to decide whether each issue is worth fixing automatically; if not, comment why and resolve or mark ready for human resolution.
  • Reply guard: review-thread replies are skipped to avoid loops.
  • Duplicate guard: hidden marker prevents repeated auto-resolve requests for the same PR head SHA.
  • No API key: this does not use openai/codex-action, OPENAI_API_KEY, or direct OpenAI API calls.

Repository setting changed

Set Database GitHub Actions workflow permissions to write so the workflow can post the @codex command comment:

  • default_workflow_permissions=write
  • can_approve_pull_request_reviews=true

Validation

  • git diff --check
  • Local workflow content check for review-comment trigger, Codex bot guard, reply guard, duplicate marker, primary @codex resolve... command, and absence of OpenAI API-key/Codex Action usage

Remaining activation requirement

Codex automatic reviews still need to be enabled for this repo in Codex Cloud settings. This PR cannot change the Codex Cloud settings page.

Remaining risk

This bridge depends on Codex Cloud responding to an @codex command posted by github-actions[bot]. If Codex ignores bot-authored commands, the fallback is a direct openai/codex-action workflow, but that requires an OPENAI_API_KEY and explicit API/cost approval.

@supabase

supabase Bot commented Jul 9, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow triggered by review comments from a specific bot to auto-post a Codex resolution instruction comment, with deduplication and reply-skip logic. Adds AGENTS.md documentation defining Codex's automatic review focus, severity calibration, fix/comment/resolve rules, and auto-resolve trigger constraints.

Changes

Codex auto-resolve automation

Layer / File(s) Summary
Auto-resolve workflow trigger and job
.github/workflows/codex-autofix-review-comments.yml
New workflow triggers on pull_request_review_comment (created) from a bot login, scoped with permissions and concurrency keyed by PR/head SHA; job skips thread replies, dedupes via a head-commit marker across paginated comments, and posts a constructed Codex instruction comment via the Issues API.
Codex review behavior policy documentation
AGENTS.md
New "Codex GitHub review behavior" section defines review focus/priorities, P0–P3 severity calibration, risk-detection categories, cost/usage controls, fix-vs-comment rules per severity, review comment lifecycle, auto-resolve trigger guardrails, and the "Primary PR command" text for resolving all review comments.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Reviewer as chatgpt-codex-connector
  participant Workflow as codex-autofix-review-comments
  participant GitHubAPI as GitHub Issues API
  participant Codex

  Reviewer->>Workflow: pull_request_review_comment (created)
  Workflow->>Workflow: check PR open state and commenter login
  Workflow->>Workflow: skip if review-thread reply
  Workflow->>GitHubAPI: paginate existing PR comments
  Workflow->>Workflow: check for existing head-commit marker
  Workflow->>GitHubAPI: create Codex instruction comment
  GitHubAPI->>Codex: instruction comment triggers resolution
Loading

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Verification Claims ❌ Error PR text claims validation via git diff --check and a local workflow check, but it doesn’t state explicit pass/fail results for those checks. Rewrite validation notes as explicit entries like Ran git diff --check: passed and Ran local workflow content check: passed (or Not run: reason).
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: a Codex review-comment auto-resolve bridge.
Description check ✅ Passed The description covers summary, behavior, validation, repo settings, and risks, so it is mostly complete despite not matching the template verbatim.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Generated And Sensitive Files ✅ Passed Only .github/workflows/codex-autofix-review-comments.yml and AGENTS.md were added; scans found no secret values, keys, .env, logs, caches, or build artifacts.
Risky Git Or Deployment Actions ✅ Passed PASS: The new workflow only posts a review-resolve comment; AGENTS adds prohibitions and safe-review guidance, with no force-push/reset/cleanup/deploy instructions.
Supabase Project And Schema Safety ✅ Passed Only a workflow and AGENTS review-policy edit changed; no Supabase env, schema, migration, RLS, or project-ref changes were touched.
Runtime And Package Manager Integrity ✅ Passed Touched files don’t change package manager or runtime pins; repo still uses npm@11.17.0, Node 24.x, and engine-strict=true.
Api Route Failure Handling ✅ Passed PASS: The PR only adds a GitHub Actions comment bridge and AGENTS guidance; no API route/server action/provider code changed, and GitHub API errors fail the step deterministically.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/auto-resolve-review-comments
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/auto-resolve-review-comments

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 9, 2026 07:33
@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Reviewed the PR trigger and current branch state. The requested auto-resolve bridge is already present on branch work, with no uncommitted changes remaining.
  • Confirmed the workflow listens for new pull_request_review_comment events, filters to open PRs and Codex connector comments, skips review-thread replies, deduplicates by PR head SHA marker, and posts the repository’s @codex resolve all review comments... command. .github/workflows/codex-autofix-review-comments.ymlL3-L65
  • Confirmed AGENTS.md contains the repository-specific Codex GitHub review behavior, severity calibration, fix rules, review lifecycle guidance, automatic resolve trigger requirements, and primary PR command. AGENTS.mdL267-L350
  • No code changes were needed, so I did not create a new commit or call the PR creation tool.

Testing

  • git diff --check
  • git status --short --branch — worktree is clean on work.

View task →

@BigSimmo
BigSimmo merged commit df98dd3 into main Jul 9, 2026
8 checks passed
@BigSimmo
BigSimmo deleted the codex/auto-resolve-review-comments branch July 9, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant